/* eslint-disable */
// 该文件由 OneAPI 自动生成，请勿手动修改！
import { request } from '@umijs/max';

// 学生论文管理查询论文
export async function queryStudentThesisList(data: Global.pageParams) {
  return request<Global.Result<Thesis.ThesisEntity[]>>(
    '/api/queryStudentThesisList',
    {
      method: 'post',
      data,
    },
  );
}

// 查询班级所属教师
export async function queryClassListByName(name: String) {
  return request(`/api/getClassTeacher?class_name=${name}`, {
    method: 'get',
  });
}

export async function createThesis(data: Thesis.ThesisEntity) {
  return request<Global.Result<Thesis.ThesisEntity>>(`/api/createThesis`, {
    method: 'post',
    data,
  });
}
export async function updateStudentThesis(data: Thesis.ThesisEntity) {
  return request<Global.Result<Thesis.ThesisEntity>>(
    `/api/updateStudentThesis`,
    {
      method: 'post',
      data,
    },
  );
}

export async function destoryThesis(data: Thesis.ThesisEntity) {
  return request<Global.Result<Thesis.ThesisEntity>>(`/api/destoryThesis`, {
    method: 'post',
    data,
  });
}

export async function deleteFile(id: any, fileName: string) {
  return request<Global.Result<Thesis.ThesisEntity>>(
    `/api/deleteFile/${id}/${fileName}`,
    {
      method: 'delete',
    },
  );
}
